package top.mccat.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.mccat.system.domain.EmployeeExcellent;
import top.mccat.system.mapper.EmployeeExcellentMapper;
import top.mccat.system.service.IEmployeeExcellentService;

/**
 * 【请填写功能名称】Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-03-30
 */
@Service
public class EmployeeExcellentServiceImpl implements IEmployeeExcellentService
{
    @Autowired
    private EmployeeExcellentMapper employeeExcellentMapper;

    /**
     * 查询【请填写功能名称】
     * 
     * @param id 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    @Override
    public EmployeeExcellent selectEmployeeExcellentById(Long id)
    {
        return employeeExcellentMapper.selectEmployeeExcellentById(id);
    }

    /**
     * 查询当月的优秀员工，原则上本月仅允许增加一次，故直接查
     * @return
     */
    @Override
    public EmployeeExcellent selectEmployeeNowMonth(Long userId){
        return employeeExcellentMapper.selectEmployeeNowMonth(userId);
    }

    /**
     * 查询【请填写功能名称】列表
     * 
     * @param employeeExcellent 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<EmployeeExcellent> selectEmployeeExcellentList(EmployeeExcellent employeeExcellent)
    {
        return employeeExcellentMapper.selectEmployeeExcellentList(employeeExcellent);
    }

    /**
     * 新增【请填写功能名称】
     * 
     * @param employeeExcellent 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertEmployeeExcellent(EmployeeExcellent employeeExcellent)
    {
        return employeeExcellentMapper.insertEmployeeExcellent(employeeExcellent);
    }

    /**
     * 修改【请填写功能名称】
     * 
     * @param employeeExcellent 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateEmployeeExcellent(EmployeeExcellent employeeExcellent)
    {
        return employeeExcellentMapper.updateEmployeeExcellent(employeeExcellent);
    }

    /**
     * 批量删除【请填写功能名称】
     * 
     * @param ids 需要删除的【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteEmployeeExcellentByIds(Long[] ids)
    {
        return employeeExcellentMapper.deleteEmployeeExcellentByIds(ids);
    }

    /**
     * 删除【请填写功能名称】信息
     * 
     * @param id 【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteEmployeeExcellentById(Long id)
    {
        return employeeExcellentMapper.deleteEmployeeExcellentById(id);
    }
}
